<?php

include("conn.php");

$state = 2;
$errinfo = "";  

$imgid = $_POST["deleimgid"];

$sql = "UPDATE images set state = 3 where id = ".$imgid;
$query = mysql_query($sql);
$row = mysql_affected_rows();
if($row>0){
    $state = 1;
    
}else{
    
    $errinfo = "后台出错了，删除失败！";
}


$resultArray = array();
$resultArray["state"] = $state; 
$resultArray["errinfo"] = $errinfo;

echo json_encode($resultArray);

?>